package com.lry.sso.auth.server.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 
 *
 * @author 李瑞益
 * @date 2019/11/23
 */
@Data
@Component
@ConfigurationProperties(prefix = "auth-config")
public class AuthConfigProperties {

    /**登录过期时间;单位秒*/
    private Integer loginExpire = 3600;

    /**token过期时间*/
    private Integer jwtExpire = 28800;

    /**续签时间；单位秒*/
    private Integer renewExpire = 600;


    /**错误密码锁定时间*/
    private Integer pwdLock = 1800;

    /**错误密码尝试次数*/
    private Integer pwdLockTimes = 5;

    /**默认10分钟*/
    private Integer errorInterval = 600;

    /**ip锁定时间*/
    private Integer ipLock = pwdLock * pwdLockTimes + errorInterval;

    /**ip锁定尝试测试*/
    private Integer ipLockTimes = 30;

    /**是否认证*/
    private Boolean isAuth = true;

}
